import 'package:kkhousekeep/generated/json/base/json_field.dart';
import 'package:kkhousekeep/generated/json/repair_order_detail_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class RepairOrderDetailEntity {
	late int code;
	late RepairOrderDetailObj obj;
	late String msg;

	RepairOrderDetailEntity();

	factory RepairOrderDetailEntity.fromJson(Map<String, dynamic> json) => $RepairOrderDetailEntityFromJson(json);

	Map<String, dynamic> toJson() => $RepairOrderDetailEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class RepairOrderDetailObj {
	late String worker;
	late int repairArea;
	late String address;
	late String repairApplicant;
	late String phone;
	late int urgency;
	late String fatalType;
	late String fatalMark;
	late List<String> pics;
	late String time;
	late String state;
	late String acceptorPhone;

	RepairOrderDetailObj();

	factory RepairOrderDetailObj.fromJson(Map<String, dynamic> json) => $RepairOrderDetailObjFromJson(json);

	Map<String, dynamic> toJson() => $RepairOrderDetailObjToJson(this);

	RepairOrderDetailObj copyWith({String? worker, int? repairArea, String? address, String? repairApplicant, String? phone, int? urgency, String? fatalType, String? fatalMark, List<String>? pics, String? time, String? state,String? acceptorPhone}) {
		return RepairOrderDetailObj()
			..worker= worker ?? this.worker
			..repairArea= repairArea ?? this.repairArea
			..address= address ?? this.address
			..repairApplicant= repairApplicant ?? this.repairApplicant
			..phone= phone ?? this.phone
			..urgency= urgency ?? this.urgency
			..fatalType= fatalType ?? this.fatalType
			..fatalMark= fatalMark ?? this.fatalMark
			..pics= pics ?? this.pics
			..time= time ?? this.time
			..state= state ?? this.state
		  ..acceptorPhone= acceptorPhone ?? this.acceptorPhone;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}